home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
tools
/
czesc_3
/
multiuser
/
src
/
library
/
libheader.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-06-29
|
4KB
|
142 lines
/************************************************************
* MultiUser - MultiUser Task/File Support System *
* --------------------------------------------------------- *
* Library Header *
* --------------------------------------------------------- *
* © Copyright 1993-1994 Geert Uytterhoeven *
* All Rights Reserved. *
************************************************************/
#include "multiuser.h"
extern char MultiUserName[];
extern char MultiUserIDString[];
extern UWORD MultiUserVersion;
extern UWORD MultiUserRevision;
/*
* Private Library Base
*/
#define TASKHASHVALUE 23
struct muBase {
struct Library LibNode;
UBYTE Flags;
UBYTE Pad;
BPTR SegList;
/*
* The Server's Process
*/
struct Process *Server;
/*
* The Server's Packet MsgPort
*/
struct MsgPort *ServerPort;
/*
* List of Tasks and their Owner(s)
*/
struct SignalSemaphore TaskOwnerSem;
struct MinList TaskOwnerList[TASKHASHVALUE];
/*
* List of Segments and their Owner
*/
struct SignalSemaphore SegOwnerSem;
struct MinList SegOwnerList;
/*
* Old AddTask()/RemTask()
*/
APTR __asm (*OLDAddTask)(register __a1 struct Task *task, register __a2 APTR initpc,
register __a3 APTR finalpc, register __a6 struct ExecBase *sysbase);
void __asm (*OLDRemTask)(register __a1 struct Task *task, register __a6 struct ExecBase *sysbase);
/*
* Old LoadSeg()/NewLoadSeg()/UnLoadSeg()/InternalLoadSeg()/
* InternalUnLoadSeg()/CreateProc()/CreateNewProc()/RunCommand()/
* SetProtection()
*/
BPTR __asm (*OLDLoadSeg)(register __d1 STRPTR name, register __a6 struct DosLibrary *DOSBase);
BPTR __asm (*OLDNewLoadSeg)(register __d1 STRPTR file, register __d2 struct TagItem *tags,
register __a6 struct DosLibrary *DOSBase);
BOOL __asm (*OLDUnLoadSeg)(register __d1 BPTR seglist, register __a6 struct DosLibrary *DOSBase);
BPTR __asm (*OLDInternalLoadSeg)(register __d0 BPTR fh, register __a0 BPTR table,
register __a1 LONG *functionarray, register __a2 LONG *stack,
register __a6 struct DosLibrary *dosbase);
BOOL __asm (*OLDInternalUnLoadSeg)(register __d1 BPTR seglist, register __a1 void (*freefunc)(),
register __a6 struct DosLibrary *dosbase);
struct Process __asm *(*OLDCreateProc)(register __d1 STRPTR name, register __d2 LONG pri,
register __d3 BPTR seglist, register __d4 LONG stacksize,
register __a6 struct DosLibrary *dosbase);
struct Process __asm *(*OLDCreateNewProc)(register __d1 struct TagItem *tags,
register __a6 struct DosLibrary *dosbase);
LONG __asm (*OLDRunCommand)(register __d1 BPTR seglist, register __d2 ULONG stacksize,
register __d3 STRPTR argptr, register __d4 ULONG argsize,
register __a6 struct DosLibrary *dosbase);
BOOL __asm (*OLDSetProtection)(register __d1 STRPTR name, register __d2 LONG mask,
register __a6 struct DosLibrary *dosbase);
/*
* Configuration
*/
struct muConfig Config;
/*
* Signals for Passwd File Notification and Consistency Check
*/
ULONG NotifySig;
ULONG ConsistencySig;
/*
* Security violation flag
*/
BOOL SecurityViolation;
/*
* MultiUser Volumes
*/
struct SignalSemaphore VolumesSem;
struct muVolume *Volumes;
/*
* Monitoring
*/
struct SignalSemaphore MonitorSem;
struct MinList MonitorList;
struct MsgPort *MonitorPort;
/*
* Task Control
*/
struct MinList Frozen;
/*
* LocaleInfo for logfile
*/
struct LocaleInfo LogInfo;
};
#define LocaleBase muBase->LogInfo.li_LocaleBase
extern struct muBase *muBase;